﻿<!--#include file="const.asp"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>


<%
if sid="Null" then
	Response.Redirect "login.asp"
	Response.end
end if
IF  Request.QueryString("Action")="save" Then
	call savea
else
	call index
end if
end Function
Function index
	dim Runtxt,str
	Runtxt=qingtian.RunStr

%>
	<card title="添加颜色页面"><p align="left">

	颜色页面名称：<br/>
	<input emptyok="true"  name="name<%=Runtxt%>" maxlength="50" value="" type="text"/><br/>
        类型：
	<select name="act<%=Runtxt%>" value="1">
	<option value="1">3G</option>
	<option value="2">彩版</option>
	<option value="3">电脑</option>
	</select><br/>
        背景色：<br/>
	<input emptyok="true"  name="a<%=Runtxt%>"  value="" type="text"/><br/>
        层深色：<br/>
	<input emptyok="true"  name="b<%=Runtxt%>"  value="" type="text"/><br/>
        层浅色：<br/>
	<input emptyok="true"  name="c<%=Runtxt%>"  value="" type="text"/><br/>
        层淡色：<br/>
	<input emptyok="true"  name="d<%=Runtxt%>"  value="" type="text"/><br/>
        字深色：<br/>
	<input emptyok="true"  name="e<%=Runtxt%>"  value="" type="text"/><br/>
        字浅色：<br/>
	<input emptyok="true"  name="f<%=Runtxt%>"  value="" type="text"/><br/>
        字淡色：<br/>
	<input emptyok="true"  name="g<%=Runtxt%>"  value="" type="text"/><br/>
        连接色：<br/>
	<input emptyok="true"  name="h<%=Runtxt%>"  value="" type="text"/><br/>
	<anchor>确定提交
    	<go href="addcsss.asp?Action=save&amp;sid=<%=sid%>" method='post'>
        <postfield name="name" value="$(name<%=Runtxt%>)"/>
        <postfield name="act" value="$(act<%=Runtxt%>)"/>
        <postfield name="a" value="$(a<%=Runtxt%>)"/>
        <postfield name="b" value="$(b<%=Runtxt%>)"/>
        <postfield name="c" value="$(c<%=Runtxt%>)"/>
        <postfield name="d" value="$(d<%=Runtxt%>)"/>
        <postfield name="e" value="$(e<%=Runtxt%>)"/>
        <postfield name="f" value="$(f<%=Runtxt%>)"/>
        <postfield name="g" value="$(g<%=Runtxt%>)"/>
        <postfield name="h" value="$(h<%=Runtxt%>)"/>
    	</go>
	</anchor><br/>
<a href='csss.asp?sid=<%=sid%>'>返回颜色页面管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%
end Function 


Function savea
		dim name,act,a,b,c,d,e,f,g,h,rs,sql,txt,path,fv,errs
		name=Request.form("name")
		act=Request.form("act")
		a=Request.form("a")
		b=Request.form("b")
		c=Request.form("c")
		d=Request.form("d")
		e=Request.form("e")
		f=Request.form("f")
		g=Request.form("g")
		h=Request.form("h")
		errs=""
		if name="" then errs=errs & "颜色页面名称不能为空<br/>"
	IF len(errs)=0 then


		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select  * FROM qingtian_css"
		rs.open sql,conn,1,3
		rs.addnew
			rs("name")=name
			rs("act")=act
		rs.update()
                fv=rs("id")
		rs.Close
		Set rs = Nothing
select case act
case "1"
txt="body {font-size:15px;line-height:1.3;width:210px;border:1px solid grey;padding:5px;margin:0 auto;margin-top:10px;margin-bottom:10px;color:"&e&"}" & chr(13) & chr(10)
txt=txt & "img {border:0}" & chr(13) & chr(10)
txt=txt & "hr {height:1;border-color:"&a&";background-color:"&a&";border-style:solid}" & chr(13) & chr(10)
txt=txt & "a {font-size:15px;text-decoration:none;color:"&h&"}" & chr(13) & chr(10)
txt=txt & "a:hover {background:"&a&";color:"&e&"}" & chr(13) & chr(10)
txt=txt & ".navi {background:"&b&";color:"&e&"}" & chr(13) & chr(10)
txt=txt & ".navi a{font-size:15px;text-decoration:none;color:"&e&"}" & chr(13) & chr(10)
txt=txt & ".navi hr{height:1;border-color:"&b&";background-color:"&b&";border-style:solid}" & chr(13) & chr(10)
txt=txt & ".block4 {background:"&d&";color:"&g&"}" & chr(13) & chr(10)
txt=txt & ".block4 hr{background:"&d&"}" & chr(13) & chr(10)
txt=txt & ".footer {background:"&c&";color:"&f&"}" & chr(13) & chr(10)
txt=txt & ".footer hr{background:"&c&"}" & chr(13) & chr(10)
txt=txt & "input{background-color:"&a&";color:"&e&";BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid}" & chr(13) & chr(10)
txt=txt & "form  {margin: 0px;display: inline;padding:0;}" & chr(13) & chr(10)
txt=txt & "font.z {color:"&e&";}" & chr(13) & chr(10)
txt=txt & "input.submit{background:"&a&";color:"&e&";border:1px solid #333}" & chr(13) & chr(10)
txt=txt & "input.num{-wap-input-format:'*N'}" & chr(13) & chr(10)
txt=txt & "input.birth{-wap-input-format:'NNNN\-NN\-NN'}" & chr(13) & chr(10)
txt=txt & "* {margin-bottom:3px;}"
case "2"
txt="body {font-size:15px;line-height:1.3;width:450px;border:1px solid grey;padding:5px;margin:0 auto;margin-top:10px;margin-bottom:10px;color:"&e&"}" & chr(13) & chr(10)
txt=txt & "img {border:0}" & chr(13) & chr(10)
txt=txt & "hr {background:"&a&"}" & chr(13) & chr(10)
txt=txt & "a {font-size:15px;text-decoration:none;color:"&h&"}" & chr(13) & chr(10)
txt=txt & "a:hover {background:"&a&";color:"&e&"}" & chr(13) & chr(10)
txt=txt & ".navi {background:"&b&";color:"&e&"}" & chr(13) & chr(10)
txt=txt & ".navi hr{background:"&b&"}" & chr(13) & chr(10)
txt=txt & ".block4 {background:"&d&";color:"&g&"}" & chr(13) & chr(10)
txt=txt & ".block4 hr{background:"&d&"}" & chr(13) & chr(10)
txt=txt & ".footer {background:"&c&";color:"&f&"}" & chr(13) & chr(10)
txt=txt & ".footer hr{background:"&c&"}" & chr(13) & chr(10)
txt=txt & "input{background-color:"&a&";color:"&e&";BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid}" & chr(13) & chr(10)
txt=txt & "form  {margin: 0px;display: inline;padding:0;}" & chr(13) & chr(10)
txt=txt & "font.z {color:"&e&";}" & chr(13) & chr(10)
txt=txt & "input.submit{background:"&a&";color:"&e&";border:1px solid #333}" & chr(13) & chr(10)
txt=txt & "input.num{-wap-input-format:'*N'}" & chr(13) & chr(10)
txt=txt & "input.birth{-wap-input-format:'NNNN\-NN\-NN'}" & chr(13) & chr(10)
txt=txt & "* {margin-bottom:3px;}"
case "3"
txt="body {font-size:20px;line-height:1.3;width:950px;border:1px solid grey;padding:5px;margin:0 auto;margin-top:10px;margin-bottom:10px;background:"&a&";color:"&e&"}" & chr(13) & chr(10)
txt=txt & "img {border:0}" & chr(13) & chr(10)
txt=txt & "hr {background:"&a&"}" & chr(13) & chr(10)
txt=txt & "a {font-size:23px;text-decoration:none;color:"&h&"}" & chr(13) & chr(10)
txt=txt & "a:hover {background:"&a&";color:"&e&"}" & chr(13) & chr(10)
txt=txt & ".navi {background:"&b&";color:"&e&"}" & chr(13) & chr(10)
txt=txt & ".navi hr{background:"&b&"}" & chr(13) & chr(10)
txt=txt & ".block4 {background:"&d&";color:"&g&"}" & chr(13) & chr(10)
txt=txt & ".block4 hr{background:"&d&"}" & chr(13) & chr(10)
txt=txt & ".footer {background:"&c&";color:"&f&"}" & chr(13) & chr(10)
txt=txt & ".footer hr{background:"&c&"}" & chr(13) & chr(10)
txt=txt & "input{background-color:"&a&";color:"&e&";BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid}" & chr(13) & chr(10)
txt=txt & "form  {margin: 0px;display: inline;padding:0;}" & chr(13) & chr(10)
txt=txt & "font.z {color:"&e&";}" & chr(13) & chr(10)
txt=txt & "input.submit{background:"&a&";color:"&e&";border:1px solid #333}" & chr(13) & chr(10)
txt=txt & "input.num{-wap-input-format:'*N'}" & chr(13) & chr(10)
txt=txt & "input.birth{-wap-input-format:'NNNN\-NN\-NN'}" & chr(13) & chr(10)
txt=txt & "* {margin-bottom:6px;}"
End Select
path="css/"
path=path & fv & ".css"
qingtian.CreateFile txt,path

	%>
<card title="修改颜色页面"><p align="left">
		添加颜色页面成功!<br/><%

	else%>

	<card title="修改颜色页面"><p align="left">
		<%=errs%>
		<a href="addcsss.asp?sid=<%=sid%>">返回修改</a><br/>
<%	end if
%>
<a href='addcsss.asp?sid=<%=sid%>'>返回添加颜色页面</a><br/>
<a href='csss.asp?sid=<%=sid%>'>返回颜色页面管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%
end Function
%>
